package com.spsoft.core.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 分页返回前端数据
 *
 * @author zjh
 * @version V1.0.0
 * @since 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class PageVo implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 分页返回数据
     */
    private Object content;
    private Object records;
    /**
     * 分页返回总条数
     */
    private Long totalElements;
    private Long total;

    public PageVo(Object records, Long total) {
        this.records = records;
        this.total = total;
    }
}
